<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.fick.hibernate.model.*"%>
<%@ page import="com.fick.hibernate.dao.*"%>
<%@ include file="../tld/tlds.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="images/jiahao.css" rel="stylesheet" type="text/css">

		<link href="css/css.css" rel="stylesheet" type="text/css" />
		<script language="JavaScript" src="js/meihuaxue.js"></script>
		<script language="javaScript" src="js/prototype.js"></script>
		<script type="text/javascript" src="js/submit.js"></script>
	
		
</head>

<body>
<table width="100%"  height="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="100%" align="center" valign="top" background="images/main_bj.gif" bgcolor="#FBFCFD"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="23" align="left" valign="middle" background="images/main_top.gif"><table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="20" height="23">&nbsp;</td>
            <td width="400" height="23" align="left" valign="middle" class="ts_lmdh2">实验管理 </td>
          </tr>
        </table></td>
      </tr>
    </table>
     
      <table width="98%" border="0" cellpadding="0" cellspacing="1" bgcolor="#D7DFE1">
      <tr><input type="button" value="添加" onclick="window.location.href='<%=request.getContextPath() %>/admin/lab_add.jsp'"/></tr>
        <tr>

          <td width="20%" height="25" align="center" valign="middle" background="images/main_t_bj.gif" bgcolor="#FFFFFF" class="ts_lmdh">实验课程名称</td>
  		  <td width="20%" height="25" align="center" valign="middle" background="images/main_t_bj.gif" bgcolor="#FFFFFF" class="ts_lmdh">所属实验室</td>
          <td width="20%" height="25" align="center" valign="middle" background="images/main_t_bj.gif" bgcolor="#FFFFFF" class="ts_lmdh">项目名称</td>
		  <td width="10%" height="25" align="center" valign="middle" background="images/main_t_bj.gif" bgcolor="#FFFFFF" class="ts_lmdh">代码</td>
		   <td width="10%" height="25" align="center" valign="middle" background="images/main_t_bj.gif" bgcolor="#FFFFFF" class="ts_lmdh">开放</td>
		    <td width="20%" height="25" align="center" valign="middle" background="images/main_t_bj.gif" bgcolor="#FFFFFF" class="ts_lmdh">操作</td>

        
        </tr>
       <%List lablist=(List)request.getAttribute("lablist"); 
       for(int i=0;i<lablist.size();i++)
       {Lab lab=(Lab)lablist.get(i);
       %>
	
	    <tr>
		
          <td width="20%" height="25" align="left" valign="middle" bgcolor="#FFFFFF" style="padding-left:7px"><%=lab.getLessonName() %></td>
          <td width="20%" height="25" align="center" valign="middle" bgcolor="#FFFFFF"><%=lab.getLabName() %></td>
		  <td width="20%" height="25" align="center" valign="middle" bgcolor="#FFFFFF"><%=lab.getProjectName() %></td>
		  <td width="10%" height="25" align="center" valign="middle" bgcolor="#FFFFFF"><%=lab.getCode() %></td>
		  <td width="10%" height="25" align="center" valign="middle" bgcolor="#FFFFFF"><%=lab.getIsOpen() %></td>
		  <td width="20%" height="25" align="center" valign="middle" bgcolor="#FFFFFF"><a href='<%=request.getContextPath() %>/admin/lab_edit.jsp?labid=<%=lab.getId() %>'>修改</a> <a href='<%=request.getContextPath() %>/admin/manageLab.do?method=delete&labid=<%=lab.getId() %>' onclick="return confirm('确定要删除吗？');"> 删除</a></td>
	
	  </tr>
	 <%} %>
	  </table>
	  
	  
	  
	  
	  <%int pagesize=(Integer)request.getAttribute("pagesize");
	    int currentpage=(Integer)request.getAttribute("currentpage");
	  %>
      <table width="98%" border="0" cellspacing="0" cellpadding="0">
        <tr>
        <td height="45" align="center" valign="middle">
          共有［<%=pagesize %>］页 当前是第［<%=currentpage+1 %>］页
           <a href="<%=request.getContextPath() %>/admin/manageLab.do?method=labList&currentpage=0">首页</a>
               <%if(currentpage==0){ %>上一页<%}
              else{ %><a href="<%=request.getContextPath() %>/admin/manageLab.do?method=labList&currentpage=<%=currentpage-1 %>">上一页</a><%} 
                                                    
              if(currentpage==pagesize-1){ %>  下一页<%} 
               else{ %><a href="<%=request.getContextPath() %>/admin/manageLab.do?method=labList&currentpage=<%=currentpage+1 %>">下一页</a><%} %> 
                                                    
             <a href="<%=request.getContextPath() %>/admin/manageLab.do?method=labList&currentpage=<%=pagesize-1 %>">尾页
         </td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
</html>

